package com.itcaius.weblog.common.enums;

import com.itcaius.weblog.common.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Caius
 * @description
 * @since Created in 2025-04-16
 */
@Getter
@AllArgsConstructor
public enum ResponseCodeEnum implements BaseExceptionInterface {

    //通用异常状态码
    SYSTEM_ERROR("1000","出错啦,后台小哥正在努力修复中..."),

    //业务异常状态码
    PRODUCT_NOT_FOUND("2000", "该产品不存在(测试使用)"),

    PARAM_NOT_VALID("10001", "参数错误"),

    //登录失败状态码
    LOGIN_FAIL("20000","登录失败"),

    USERNAME_OR_ERROR("20001","用户名或密码错误"),

    UNAUTHORIZED("20002","无访问权限，先登录！"),

    FORBIDDEN("20004","演示账号仅支持查询操作！"),

    USERNAME_NOT_FOUND("20005", "该用户不存在！"),

    CATEGORY_NAME_IS_EXISTED("20006","该分类已经存在,请勿重复添加"),

    TAG_CANT_DUPLICATE("20006", "请勿添加表中存在的标签"),

    TAG_NOT_EXISTED("20007", "该标签不存在！"),

    CATEGORY_NOT_EXISTED("20008","该分类不存在！"),

    FILE_UPLOAD_FAILED("20009", "上传文件失败！"),

    ARTICLE_NOT_FOUND("20010","该文章不存在！"),

    CATEGORY_CAN_NOT_DELETE("20011", "该分类下面包含文章，请先删除文章，才能删除！"),

    TAG_CAN_NOT_DELETE("20012", "该标签下包含文章，请先删除对应文章，才能删除！"),

    WIKI_NOT_FOUND("20013", "该知识库不存在"),

    ;

    private String errorCode;

    private String errorMessage;
}
